home *** CD-ROM | disk | FTP | other *** search
- //---------------------------------------------------------------------------
- // RedGreen.h
- //---------------------------------------------------------------------------
-
- //---------------------------------------------------------------------------
- // Resource Information
- //---------------------------------------------------------------------------
- // Toolbox bitmap resource IDs numbers.
- //---------------------------------------------------------------------------
- #define IDBMP_RedGreen 8000
- #define IDBMP_RedGreenDOWN 8001
- #define IDBMP_RedGreenMONO 8003
- #define IDBMP_RedGreenEGA 8006
-
- //---------------------------------------------------------------------------
- // Update these fields for each build.
- //---------------------------------------------------------------------------
- #define VBX_VERSION 3,00,0,00
- #define VBX_VERSION_STR "3.00.000"
-
- #ifndef RC_INVOKED
- //---------------------------------------------------------------------------
- // Macro for referencing member of structure
- //---------------------------------------------------------------------------
- #define OFFSETIN(struc,field) ((USHORT)&(((struc *)0)->field))
-
-
- //---------------------------------------------------------------------------
- // Control Procedure
- //---------------------------------------------------------------------------
- LONG FAR PASCAL _export RedGreenCtlProc(HCTL, HWND, USHORT, USHORT, LONG);
-
- //---------------------------------------------------------------------------
- // RedGreen control data and structs
- //---------------------------------------------------------------------------
- typedef struct tagRedGreen
- {
- ENUM About;
- BOOL Value;
- } RedGreen;
-
- typedef RedGreen FAR * LPRedGreen;
-
- #define LpRedGreenDEREF(hctl) ((LPRedGreen)VBDerefControl(hctl))
-
-
- //---------------------------------------------------------------------------
- // Property info
- //---------------------------------------------------------------------------
-
- PROPINFO Property_About =
- {
- "About",
- DT_ENUM | PF_fGetData | PF_fSetMsg | PF_fSetMsg,
- OFFSETIN(RedGreen, About), 0,
- 0,
- "Click on ""..."" for About Box\0",
- 0
- };
-
- PROPINFO Property_Value =
- {
- "Value",
- DT_BOOL | PF_fGetData | PF_fSaveData | PF_fSetData | PF_fSetMsg,
- OFFSETIN(RedGreen, Value),
- 0, 0, NULL, 0
- };
-
-
- //---------------------------------------------------------------------------
- // Property list
- //---------------------------------------------------------------------------
- // Define the consecutive indicies for the properties
- //---------------------------------------------------------------------------
- #define IPROP_RedGreen_CTLNAME 0
- #define IPROP_RedGreen_HWND 1
- #define IPROP_RedGreen_INDEX 2
- #define IPROP_RedGreen_About 3
- #define IPROP_RedGreen_ENABLED 4
- #define IPROP_RedGreen_HEIGHT 5
- #define IPROP_RedGreen_LEFT 6
- #define IPROP_RedGreen_TOP 7
- #define IPROP_RedGreen_VISIBLE 8
- #define IPROP_RedGreen_WIDTH 9
- #define IPROP_RedGreen_Value 10
-
- PPROPINFO RedGreen_Properties[] =
- {
- PPROPINFO_STD_CTLNAME,
- PPROPINFO_STD_HWND,
- PPROPINFO_STD_INDEX,
- &Property_About,
- PPROPINFO_STD_ENABLED,
- PPROPINFO_STD_HEIGHT,
- PPROPINFO_STD_LEFT,
- PPROPINFO_STD_TOP,
- PPROPINFO_STD_VISIBLE,
- PPROPINFO_STD_WIDTH,
- &Property_Value,
- NULL
- };
-
-
- //---------------------------------------------------------------------------
- // Event info
- //---------------------------------------------------------------------------
-
- //---------------------------------------------------------------------------
- // Event list
- //---------------------------------------------------------------------------
- // Define the consecutive indicies for the events
- //---------------------------------------------------------------------------
- #define IEVENT_RedGreen_MOUSEMOVE 0
-
- PEVENTINFO
- RedGreen_Events[] =
- {
- PEVENTINFO_STD_MOUSEMOVE,
- NULL
- };
-
-
- //---------------------------------------------------------------------------
- // Model struct
- //---------------------------------------------------------------------------
- // Define the control model (using the event and property structures).
- //---------------------------------------------------------------------------
- MODEL modelRedGreen =
- {
- VB_VERSION, // VB version being used
- 0, // MODEL flags
- (PCTLPROC)RedGreenCtlProc, // Control procedure
- 0 | CS_HREDRAW | CS_VREDRAW, // Class style
- 0L, // Default Windows style
- sizeof(RedGreen), // Size of CIRC structure
- IDBMP_RedGreen, // Palette bitmap ID
- "RedGreen", // Default control name
- "RedGreen", // Visual Basic class name
- NULL, // Parent class name
- RedGreen_Properties, // Property information table
- RedGreen_Events, // Event information table
- 0, // Default property
- 0, // Default event
- };
- #endif // RC_INVOKED
- //---------------------------------------------------------------------------
-